<?php echo $this->fetch('top.html'); ?>
<script type="text/javascript">
$(function(){
	$("img.lazyload").lazyLoad();
	
	/* 首页轮播 */
	if($('#slides').children('div').length>1){
		$('#slides').slidesjs({
			width: 320,
			height: 120,
			navigation: false,
			play: {
				auto: true
			}
		});
	}
	
	// 屏幕分辨率大于640的情况
	width = $(window).width();
	if(width<640) {
		$('.J_Floor img').attr('width', width/2-0.5);
	}
	
})
function submitForm()
{
	window.location.href=REAL_SITE_URL+"/index.php?app=search&keyword="+$('#keyword').val();
	return false;
}
</script>
<div id="main" class="w-full">
	<div id="page-home" class="w mb20"> 
		
		<div class="bar-wrap">
			<div style="line-height:30px;" class="top-bar">
        	<a href="<?php echo $this->_var['site_url']; ?>" class="pagelogo"><span></span></a>
            <div class="store-search">
                <form id="search-form">
                    <input name="keyword" id="keyword" type="text" class="kw border-0" placeholder="ECMall手机触屏版"/>
                    <p><a href="javascript:;" onclick="submitForm();" class="submit"></a></p>
                </form>
            </div>
            <a href="javascript:;" class="pagemore J_pagemore"><span></span></a>
        </div>
        <div class="eject-tab J_eject_tab w-full clearfix hidden"> <a href="index.php"> <span></span>
				<p>首页</p>
				</a> <a href="<?php echo url('app=search'); ?>"> <span class="icon2"></span>
				<p>分类搜索</p>
				</a> <a href="<?php echo url('app=cart'); ?>"> <span class="icon3"></span>
				<p>购物车</p>
				</a> <a href="<?php echo url('app=member'); ?>"> <span class="icon4"></span>
				<p>用户中心</p>
				</a> </div>
		</div>
		
		<div class="banner scroll-wrapper w">
			<div id="slides" class="scroller" >
				<?php $_from = $this->_var['slides']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'slide');$this->_foreach['fe_slide'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_slide']['total'] > 0):
    foreach ($_from AS $this->_var['slide']):
        $this->_foreach['fe_slide']['iteration']++;
?>
				<div>
                	<a href='<?php echo $this->_var['slide']['ad_link_url']; ?>'><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['slide']['ad_image_url']; ?>" /></a>
                </div>
                <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
			</div>
			<ul class="new-banner-num new-tbl-type" id="idNum">
			</ul>
		</div>
		<div class="category">
			<ul class="clearfix">
				<li class="menu menu1"><a href="<?php echo url('app=category'); ?>"></a><span>分类</span></li>
				<li class="menu menu2"><a href="<?php echo url('app=cart'); ?>"></a><span>购物车</span></li>
				<li class="menu menu3"><a href="<?php echo url('app=member'); ?>"></a><span>会员</span></li>
				<li class="menu menu4"><a href="<?php echo url('app=my_coupon'); ?>"></a><span>优惠券</span></li>
				<li class="menu menu5"><a href="<?php echo url('app=buyer_order'); ?>"></a><span>订单</span></li>
			</ul>
		</div>
		<div class="floor floor1 J_Floor">
			<div class="content clearfix">
				<div class="col-1"><a href="<?php echo $this->_var['floor_1']['ads']['1']['ad_link_url']; ?>"><img src="<?php echo $this->_var['floor_1']['ads']['1']['ad_image_url']; ?>" /></a></div>
				<div class="col-2">
					<div class="border-left"> <a href="<?php echo $this->_var['floor_1']['ads']['2']['ad_link_url']; ?>" class="border-bottom"><img src="<?php echo $this->_var['floor_1']['ads']['2']['ad_image_url']; ?>"  /></a> <a href="<?php echo $this->_var['floor_1']['ads']['3']['ad_link_url']; ?>"><img src="<?php echo $this->_var['floor_1']['ads']['3']['ad_image_url']; ?>" /></a> </div>
				</div>
			</div>
		</div>
		<div class="labels clearfix"> 
        	 <?php $_from = $this->_var['floor_1']['keywords']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'kw1');if (count($_from)):
    foreach ($_from AS $this->_var['kw1']):
?>
        	<span><a href="<?php echo $this->_var['kw1']['link']; ?>" class="yahei" res="1"><?php echo htmlspecialchars($this->_var['kw1']['title']); ?></a></span> 
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </div>
		<div class="floor floor2  J_Floor">
			<div class="title yahei"><?php echo htmlspecialchars($this->_var['floor_2']['model_name']); ?></div>
			<div class="content clearfix">
				<div class="col-1"><a href="<?php echo $this->_var['floor_2']['ads']['1']['ad_link_url']; ?>"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_2']['ads']['1']['ad_image_url']; ?>" /></a></div>
				<div class="col-2">
					<div class="border-left"> <a href="<?php echo $this->_var['floor_2']['ads']['2']['ad_link_url']; ?>" class="border-bottom"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_2']['ads']['2']['ad_image_url']; ?>"  /></a> <a href="<?php echo $this->_var['floor_2']['ads']['2']['ad_link_url']; ?>"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_2']['ads']['3']['ad_image_url']; ?>" /></a> </div>
				</div>
			</div>
            <div class="labels clearfix"> 
        	 	<?php $_from = $this->_var['floor_2']['keywords']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'kw2');if (count($_from)):
    foreach ($_from AS $this->_var['kw2']):
?>
        		<span><a href="<?php echo $this->_var['kw2']['link']; ?>" class="yahei" res="1"><?php echo htmlspecialchars($this->_var['kw2']['title']); ?></a></span> 
            	<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
       	 	</div>
		</div>
		<div class="floor floor3  J_Floor">
			<div class="title yahei"><?php echo htmlspecialchars($this->_var['floor_3']['model_name']); ?></div>
			<div class="content clearfix">
				<div class="col-1">
					<div class="border-right"> <a href="<?php echo $this->_var['floor_3']['ads']['1']['ad_link_url']; ?>"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_3']['ads']['1']['ad_image_url']; ?>" /></a><a href="<?php echo $this->_var['floor_3']['ads']['2']['ad_link_url']; ?>" class="border-top"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_3']['ads']['2']['ad_image_url']; ?>" /></a> </div>
				</div>
				<div class="col-2"> <a href="<?php echo $this->_var['floor_3']['ads']['3']['ad_link_url']; ?>"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_3']['ads']['3']['ad_image_url']; ?>" /></a> </div>
			</div>
		</div>
		<div class="labels clearfix"> 
        	 <?php $_from = $this->_var['floor_3']['keywords']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'kw3');if (count($_from)):
    foreach ($_from AS $this->_var['kw3']):
?>
        	<span><a href="<?php echo $this->_var['kw3']['link']; ?>" class="yahei" res="1"><?php echo htmlspecialchars($this->_var['kw3']['title']); ?></a></span> 
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </div>
		<div class="floor floor4  J_Floor">
			<div class="title yahei"><?php echo htmlspecialchars($this->_var['floor_4']['model_name']); ?></div>
			<div class="content clearfix">
				<div class="col-1"><a href="<?php echo $this->_var['floor_4']['ads']['1']['ad_link_url']; ?>"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_4']['ads']['1']['ad_image_url']; ?>" /></a></div>
				<div class="col-2">
					<div class="border-left"> <a href="<?php echo $this->_var['floor_4']['ads']['2']['ad_link_url']; ?>" class="border-bottom"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_4']['ads']['2']['ad_image_url']; ?>" /></a><a href="<?php echo $this->_var['floor_4']['ads']['3']['ad_link_url']; ?>"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_4']['ads']['3']['ad_image_url']; ?>" /></a></div>
				</div>
			</div>
		</div>
		<div class="labels clearfix"> 
        	 <?php $_from = $this->_var['floor_4']['keywords']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'kw4');if (count($_from)):
    foreach ($_from AS $this->_var['kw4']):
?>
        	<span><a href="<?php echo $this->_var['kw4']['link']; ?>" class="yahei" res="1"><?php echo htmlspecialchars($this->_var['kw4']['title']); ?></a></span> 
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </div>
		<div class="floor floor5  J_Floor">
			<div class="title yahei"><?php echo htmlspecialchars($this->_var['floor_5']['model_name']); ?></div>
			<div class="content clearfix">
				<div class="col-1"><a href="<?php echo $this->_var['floor_5']['ads']['1']['ad_link_url']; ?>"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_5']['ads']['1']['ad_image_url']; ?>" /></a></div>
				<div class="col-2">
					<div class="border-left"> <a href="<?php echo $this->_var['floor_5']['ads']['2']['ad_link_url']; ?>" class="border-bottom"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_5']['ads']['2']['ad_image_url']; ?>" /></a><a href="<?php echo $this->_var['floor_5']['ads']['3']['ad_link_url']; ?>"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['floor_5']['ads']['3']['ad_image_url']; ?>" /></a></div>
				</div>
			</div>
		</div>
        <div class="labels clearfix"> 
        	 <?php $_from = $this->_var['floor_5']['keywords']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'kw5');if (count($_from)):
    foreach ($_from AS $this->_var['kw5']):
?>
        	<span><a href="<?php echo $this->_var['kw5']['link']; ?>" class="yahei" res="1"><?php echo htmlspecialchars($this->_var['kw5']['title']); ?></a></span> 
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </div>
		<ul class="theme clearfix">
        	<?php $_from = $this->_var['six_images']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'six_image');$this->_foreach['fe_six_image'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_six_image']['total'] > 0):
    foreach ($_from AS $this->_var['six_image']):
        $this->_foreach['fe_six_image']['iteration']++;
?>
			<li><a style="<?php if ($this->_foreach['fe_six_image']['iteration'] % 2 == 0): ?>margin-left:0.25rem;<?php else: ?>margin-right:0.25rem;<?php endif; ?>" href="<?php echo $this->_var['six_image']['ad_link_url']; ?>"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['six_image']['ad_image_url']; ?>" /></a></li>
            <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
		</ul>
		<div class="global-image-ads"><a href="<?php echo $this->_var['banner']['ad_link_url']; ?>"><img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['banner']['ad_image_url']; ?>" /></a></div>
         <div class="rec_goods">
         	<div class="content">
                <?php $_from = $this->_var['rec_goods']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'rec');$this->_foreach['fe_rec'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_rec']['total'] > 0):
    foreach ($_from AS $this->_var['rec']):
        $this->_foreach['fe_rec']['iteration']++;
?>
                <div class="list clearfix">
                    <?php $_from = $this->_var['rec']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'goods');$this->_foreach['fe_goods'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['fe_goods']['total'] > 0):
    foreach ($_from AS $this->_var['goods']):
        $this->_foreach['fe_goods']['iteration']++;
?>
                    <a class="it<?php echo $this->_foreach['fe_goods']['iteration']; ?>" href="<?php echo url('app=goods&id=' . $this->_var['goods']['goods_id']. ''); ?>">
                    	<p>
                            <img src="mobile/static/images/empty.gif"  class="lazyload" initial-url="<?php echo $this->_var['goods']['default_image']; ?>"/>	
                            <span><?php echo htmlspecialchars($this->_var['goods']['goods_name']); ?></span>
                            <b><?php echo price_format($this->_var['goods']['price']); ?></b>
                        </p>
                    </a>
                    <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                </div>
                <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
            </div>
         </div>
	</div>
</div>
<?php echo $this->fetch('footer.html'); ?>